#ifndef __LIST_H__
#define __LIST_H__

#include <stdlib.h>
#include <stdio.h>

typedef struct node_t {
    void* data;
    struct node_t* next;
} node_t;

typedef struct list_t {
    node_t* first;
} list_t;

void print_error(const char* error_msg);
list_t* init_list();
void free_list(list_t* l);
int list_length(list_t* l);
int push(list_t* l, void* data);
void* pop(list_t* l);

#endif
